package com.smartleanx.module.hrm.dal.mysql.examine.examineFlowPath;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examineFlowPath.ExamineFlowPathDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examineFlowPath.vo.*;

/**
 * 考核流程 Mapper
 *
 * @author 
 */
@Mapper
public interface ExamineFlowPathMapper extends BaseMapperX<ExamineFlowPathDO> {

    default PageResult<ExamineFlowPathDO> selectPage(ExamineFlowPathPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineFlowPathDO>()
                .eqIfPresent(ExamineFlowPathDO::getFlowPathType, reqVO.getFlowPathType())
                .eqIfPresent(ExamineFlowPathDO::getFlowPathEmployeeId, reqVO.getFlowPathEmployeeId())
                .eqIfPresent(ExamineFlowPathDO::getFlowPathVisible, reqVO.getFlowPathVisible())
                .eqIfPresent(ExamineFlowPathDO::getFlowPathComment, reqVO.getFiowPathComment())
                .eqIfPresent(ExamineFlowPathDO::getExamineId, reqVO.getExamineId())
//                .betweenIfPresent(ExamineFlowPathDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ExamineFlowPathDO::getId));
    }

}